﻿namespace instamuz.Application.Tests
{
    using System.Linq;
    using Domain.Entities;
    using Xunit;

    public class FollowingLogicTests
    {
        [Fact]
        public void FollowActionAddingAccountToFollowingList()
        {
            var account1 = new Account("1@1.met", "l1");
            var account2 = new Account("2@2.met", "l2");

            Assert.False(account1.Following.Contains(account2));
            
            account1.Follow(account2);

            Assert.True(account1.Following.Contains(account2));
        }

        [Fact]
        public void FollowActionsAddingAccountToFollowersList()
        {
            var account1 = new Account("1@1.met", "l1");
            var account2 = new Account("2@2.met", "l2");

            Assert.False(account2.Followers.Contains(account1));

            account1.Follow(account2);

            Assert.True(account2.Followers.Contains(account1));
        }
    }
}